<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改进货订单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-purchase-edit" th:object="${wmsPurchase}">
            <input name="purId" th:field="*{purId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">入库单编号：</label>
                <div class="col-sm-8">
                    <input name="purStoId" th:field="*{purStoId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总金额：</label>
                <div class="col-sm-8">
                    <input name="purMoney" th:field="*{purMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="purSubmittime" th:value="${#dates.format(wmsPurchase.purSubmittime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态 ：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input name="purStatus" th:field="*{purStatus}" class="form-control" type="text" required>
                        <!--<input type="radio" name="purStatus" value="" required>-->
                        <!--<label th:for="purStatus" th:text="未知"></label>-->
                    </div>
                    <!--<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "essentials/purchase";
        $("#form-purchase-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-purchase-edit').serialize());
            }
        }

        $("input[name='purSubmittime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>